Skip to content

Compare terminal Jepsen cursors with origin stream heads - #21

Open
jeregrine wants to merge 1 commit into
mainfrom
fix-jepsen-cursor-heads
Open

Compare terminal Jepsen cursors with origin stream heads#21
jeregrine wants to merge 1 commit into
mainfrom
fix-jepsen-cursor-heads

Conversation

@jeregrine

Copy link
Copy Markdown
Member

Problem

The terminal invariant accepted any nonnegative receiver cursor under current authority. A receiver at cursor 101 for an origin whose head was 1 could therefore report healthy, and a missing required cursor was invisible to that check.

Fix

Capture each origin's active epochs and fully applied per-shard stream heads independently, alongside every receiver cursor and its actual lane. The independent checker derives admitted streams from both sides' active clusters and requires exact terminal positions. Head-zero streams permit an absent cursor or a zero admission marker; stale, retired, wrong-lane and otherwise extra cursors are rejected, including extra zero cursors.

Stream evidence participates in terminal stability comparisons. Existing internal invariants remain in place, and snapshot clients collect evidence without adding cross-node calls to Group shards.

Supporting information

Terminal captures now require stream evidence; older histories cannot qualify without it. Generation and epoch references use opaque external-term encodings to retain identity across EDN transport.

Executable capture qualification uses three real Group nodes and the actual snapshot-to-EDN boundary, including the cursor-101/head-1 counterexample, missing required cursors, no-write streams, cluster closure, instance restart and retirement. It is separate from the Java-only pure checker and included in the normal Mix gate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant